package com.learn.reflect;

import org.junit.Test;

/**
 * 通过反射创建运行时类的对象
 */
public class getNewInstance {
    @Test
    public void test1() throws IllegalAccessException, InstantiationException {
        Class<Person> clazz = Person.class;

        Person obj = (Person) clazz.newInstance();
        System.out.println(obj);
    }
}
